home *** CD-ROM | disk | FTP | other *** search
/ Chip 1997 November / CHIP Kasım 1997.iso / ARACLAR / TER500 / 500TER._XE / SCRIPT.EXE / SHOWKEY.TSL < prev    next >
Encoding:
Text File  |  1995-08-09  |  1.2 KB  |  45 lines

  1. % -----------------------------------------------------------------------------
  2. % Keyboard demonstration script                        *TERMINATE PRESCRIPTION*
  3. % -----------------------------------------------------------------------------
  4. %
  5. %  Version          : 1.00
  6. %  Filename         : SHOWKEY.TSL
  7. %  Company          : None
  8. %  Programmer       : Dave Wapstra & Bo Bendtsen
  9. %  Module created   : 07 Aug 1995
  10. %  Latest revision  : 09 Aug 1995
  11. %  Language/version : Terminate Prescription 1.00
  12. %  Remarks          : Demonstrates keyboard functions
  13. %
  14. % -----------------------------------------------------------------------------
  15.  
  16. Window 1,1,30,15,6,0,23,23,27," ShowKey "
  17. WriteAStr 2,0,23," Esc to Abort "
  18.  
  19. Set Key=0
  20. Repeat
  21.   If AltPressed=1
  22.     WriteAStr 2,14,23+128," Alt "
  23.   Else
  24.     WriteAStr 2,14,23,"─────"
  25.   Endif
  26.   If CtrlPressed=1
  27.     WriteAStr 9,14,23+128," Ctrl "
  28.   Else
  29.     WriteAStr 9,14,23,"──────"
  30.   Endif
  31.   If ShiftPressed=1
  32.     WriteAStr 16,14,23+128," Shift "
  33.   Else
  34.     WriteAStr 16,14,23,"───────"
  35.   Endif
  36.   If Keypressed=1
  37.     Set Key=GetKey
  38.     SetAttr 23
  39.     Println BlankBefore(Key,4)," ",WordToHex(Key)
  40.   Endif
  41. Until Key = 27
  42.  
  43. RemoveWindow
  44.  
  45.